package com.google.gwt.gfx.client.graphics.svg;

import com.google.gwt.gfx.client.graphics.Graphic;
import com.google.gwt.gfx.client.style.DefaultStyle;
import com.google.gwt.user.client.Element;

public class SVGDefaultStyle extends DefaultStyle {

	public SVGDefaultStyle(Graphic g) {
		super(g);
	}

	public SVGDefaultStyle(Graphic g, Element element) {
		super(g, element);
	}

	@Override
	public int getHeight() {
		return Integer.parseInt(getProperty("height"));
	}

	@Override
	public int getLeft() {
		return Integer.parseInt(getProperty("x"));
	}

	@Override
	public int getTop() {
		return Integer.parseInt(getProperty("y"));
	}

	@Override
	public int getWidth() {
		return Integer.parseInt(getProperty("width"));
	}

	@Override
	public void setHeight(int height) {
		setProperty("height", height + "");
	}

	@Override
	public void setLeft(int left) {
		setProperty("x", left + "");
	}

	@Override
	public void setTop(int top) {
		setProperty("y", top + "");
	}

	@Override
	public void setWidth(int width) {
		setProperty("width", width + "");
	}

}
